feat(providers): promote groq, deepseek, mistral, together to first-class defaults (closes #5)#39
Merged
Merged
Conversation
…lass defaults (closes #5) Promote four direct-key, OpenAI-compatible vendors to typed first-class friendly-name defaults: groq, deepseek, mistral, together. Each endpoint URL, key env-var name, and default model id was verified against current vendor docs. All four are OpenAI chat-completions compatible, so each is served by the existing OpenAICompatAdapter; no native adapter was added. Aggregators/routers (e.g. OpenRouter) are deliberately NOT promoted to first-class to preserve the no-middleman positioning (PDD section 11); they remain config-only via endpoints:. Wiring follows the single-source-of-truth pattern: providers are declared once in registry.OPENAI_COMPAT_PROVIDERS with matching entries in adapters.openai_compat.OPENAI_COMPAT_URLS. PROVIDER_ENV_VARS, redact() coverage, the import-time drift guard, and conclave providers all derive from it and stay consistent. The drift guard stays green and still fails on a half-registration. Tests (offline, transport-mocked): per-provider name -> URL + model id + env var resolution, end-to-end call_model via mocked transport, missing-key skip, and redact() scrubbing each new provider's key value out of an error string. Also asserts conclave providers lists the new providers. 151 -> 172 tests. Docs: README provider table + extension note, PDD section 5 matrix, section 9 #3 marked LANDED, adapter/module descriptions updated. config.example.yml left unchanged (separate docs cleanup).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements issue #5: promotes four direct-key, OpenAI-compatible vendors to typed first-class friendly-name defaults —
groq,deepseek,mistral,together. Each endpoint URL, key env-var name, and default model id was verified against current vendor docs before adding.No native adapter was added: all four are OpenAI chat-completions compatible, so each is served by the existing
OpenAICompatAdapter. Aggregators/routers (e.g. OpenRouter) are deliberately not promoted to first-class to preserve the no-middleman positioning (PDD §11); they remain available config-only viaendpoints:.Providers added (verified against vendor docs)
groqhttps://api.groq.com/openai/v1/chat/completionsGROQ_API_KEYgroq/llama-3.3-70b-versatiledeepseekhttps://api.deepseek.com/v1/chat/completionsDEEPSEEK_API_KEYdeepseek/deepseek-chatmistralhttps://api.mistral.ai/v1/chat/completionsMISTRAL_API_KEYmistral/mistral-large-latesttogetherhttps://api.together.xyz/v1/chat/completionsTOGETHER_API_KEYtogether/meta-llama/Llama-3.3-70B-Instruct-TurboDropped candidate:
fireworks— vendor docs setOPENAI_API_KEYin examples rather than a dedicatedFIREWORKS_API_KEY, and no conventional env-var name is clearly documented. Dropped rather than guess (would collide with OpenAI's var). Stays usable config-only viaendpoints:.Single-source-of-truth wiring
Declared once in
registry.OPENAI_COMPAT_PROVIDERSwith matchingadapters.openai_compat.OPENAI_COMPAT_URLSentries.PROVIDER_ENV_VARS,redact()coverage, the import-time drift guard, andconclave providersall derive from it. The drift guard stays green and still fails loudly on a half-registration (verified).redact()covers the new key env vars automatically via the single-source derivation.Tests (offline, transport-mocked) — 151 → 172
Per new provider: name → URL + model id + env var resolution; end-to-end
call_modelvia mocked transport; missing-key skip;redact()scrubbing the key value out of an error string. Plus aconclave providerslisting assertion for all four.python -m pytest -q: 172 passedruff check .: All checks passedruff format --check .: cleanOut of scope
config.example.yml's stale "LiteLLM model id" note is left untouched (separate docs cleanup, per issue).